package com.Arsanesia.TempleRush.Controllers.Listeners;

import com.Arsanesia.TempleRush.TempleRush;
import com.Arsanesia.TempleRush.Views.Screens.AbstractScreen;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.scenes.scene2d.InputEvent;

public class GameOverListener extends ChangeScreenOnClickListener{

	
	private final float BUTTON_WIDTH = 67;
	private final float BUTTON_HEIGHT= 72;
	private Rectangle homeButtonBound;
	public GameOverListener(TempleRush game){
		super(game);
		homeButtonBound = new Rectangle(AbstractScreen.VIEWPORT_DEFAULTWIDTH-BUTTON_WIDTH, 0,
										BUTTON_HEIGHT,BUTTON_HEIGHT);
	}
	public void clicked(InputEvent event, float x, float y){
		super.clicked(event, x, y);
		//go to menuscreen if home image clicked
		if(homeButtonBound.contains(x,y))
			game.setScreen(game.getMenuScreen());
	}
}
